import request1 from '@/utils/request1'
export const warehousePage = (params) => {
  return request1({
    url: 'area/pageDetail',
    params
  })
}
/**
 * 新增库区编号
 */
export const codeFactory = () => {
  return request1({
    url: 'codeFactory/next/KQ'
  })
}
/**
 * 新增所属仓库的下拉数据
 */
export const WarehouseList = () => {
  return request1({
    url: 'warehouse/list',
    params: {
      status: 1
    }
  })
}
/**
 * 新增仓库
 */
export const Addwarehouse = (data) => {
  return request1({
    url: 'area',
    method: 'post',
    data
  })
}
/**
 * 编辑拿到id回写数据
 */
export const Editwarehouse = (id) => {
  return request1({
    url: `area/${id}`
  })
}
/**
 * 编辑修改数据
 */
export const Updatawarehouse = (data) => {
  return request1({
    url: 'area',
    method: 'put',
    data
  })
}
